import React from "react";
import UserInfo from "./UserInfo";
import RoomList from "./RoomList";
import "./index.css"

const Index: React.FC<{ menuIndex: number }> = (props) => {
    const {menuIndex} = props
    return (
        <div className={"menu-box"}>
            {(() => {
                switch (menuIndex) {
                    case 1:
                        return <RoomList/>;
                    case 2:
                        return <UserInfo/>
                }
            })()}
        </div>
    )
}
export default Index